<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const updateManager = wx.getUpdateManager();
			
			    updateManager.onCheckForUpdate(function (res) {
			      console.log("是否有新版本", res.hasUpdate); // 检查是否有新版本
			    });
			
			    updateManager.onUpdateReady(function () {
			  //     wx.showModal({
			  //       title: '更新提示',
			  //       content: '本次新版本更新已完成，请点击确定完成更新',
					// showCancel: false,
			  //       success(res) {
			  //         if (res.confirm) {
			  //           updateManager.applyUpdate(); // 应用新版本并重启
			  //         }
			  //       }
			  //     });
					updateManager.applyUpdate(); // 应用新版本并重启
			    });
			
			    updateManager.onUpdateFailed(function () {
			      console.log('新版本下载失败'); // 处理下载失败
			    });
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "colorui/main.css";
	
	@import "colorui/icon.css";
	.bg-self-orange{
		background-color: #ffa500;
		color: white;
	}
	.bg-self-green{
		background-color: #44a222;
		color: white;
	}
	.bg-self-red{
		background-color: #CD0100;
		color: white;
	}
	.text-self-green{
		color: #44a222;
	}
	.self-shadow{
		box-shadow:1px 1px 3px 3px #d0d0ce;
	}
	.text-ellipsis{
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	.iconImg1{
		width: 100rpx;
		height: 100rpx;
		background-color: white;
	}
	.iconImg1::after{
		border: 0;
	}
	.bg-self-blue{
		background-color: rgba(24,30,54,1);
	}
	.text-self-blue{
		color: rgba(24,30,54,1);
	}
	.topEaBg{
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		height: 300rpx;
		background-image: url(@/static/newVer/my/bg.png);
		background-size: 100% 100%;
		transform: scaleY(1.5);
		z-index: -1;
	}
</style>
